package com.itbaizhan.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 搜索实体类
 */
@Document(indexName = "lg_index")
@Data
public class SearchPojo {
    @Id
    @Field(name = "id",type = FieldType.Keyword)
    private String id; //主键
    @Field(name = "title", type = FieldType.Text,analyzer = "ik_max_word")
    private String title; //标题
    @Field(name = "rentType", type = FieldType.Text,analyzer = "ik_max_word")
    private String rentType; //租赁类型
    @Field(name = "price", type = FieldType.Long)
    private Long price; //价格
    @Field(name = "houseType", type = FieldType.Text,analyzer = "ik_max_word")
    private String houseType; //房屋类型
    @Field(name = "img", type = FieldType.Text)
    private String img; //图片地址
    @Field(type = FieldType.Keyword,name = "city")
    private String city; //城市
}
